SetNamespace Method (Fields Collection) 

The SetNamespace method selects the property set that is to be used for subsequent property accesses using the Add method and Item property.

Syntax

objFieldsColl.SetNamespace PropsetID

Parameters

objFieldsColl

Required. The Fields collection object.

PropsetID

Required. String. Contains a unique identifier that identifies the property set, represented as a string of hexadecimal characters. The PropsetID identifies the property set to be used for subsequent property accesses using the Field object and Fields collection. An empty string resets the default to the property set PS_PUBLIC_STRINGS.

Remarks

The initial default value for the property set is PS_PUBLIC_STRINGS. To create your own property set for your named properties, supply a unique property set identifier to SetNamespace. This property set then replaces PS_PUBLIC_STRINGS as the default property set for all subsequent named property accesses using this object. The default property set is used unless explicitly overridden by the optional PropsetID parameter. The value is set only for the current object; to continue using the same property set for all objects, you must call SetNamespace for each Message object.

To define a new property set, obtain a string that contains hexadecimal characters representing a unique identifier. You can obtain this identifier using either the Win32 command-line utility UUIDGEN or by calling the Win32 function CoCreateGuid.

See Also

Fields Collection0EU12H